package com.taxi.driver.module.vo;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import com.taxi.driver.data.entity.GrabOrderEntity;

import java.io.Serializable;

public class GrabOrderVO implements Serializable {

    public static GrabOrderVO createFrom(GrabOrderEntity entity) {
        if (entity == null) return new GrabOrderVO();
        String strJson = JSON.toJSONString(entity);
        return JSON.parseObject(strJson, GrabOrderVO.class);
    }

    @JSONField(name = "uuid")
    public String uuid;

    @JSONField(name = "deparTime")
    public long time;//发出时间

    @JSONField(name = "originCity")
    public String startCity;//起始城市

    @JSONField(name = "originBuscircle")
    public String startArea;//起始区域

    @JSONField(name = "destCity")
    public String endCity;//目标城市

    @JSONField(name = "destBuscircle")
    public String endArea;//目标区域

    @JSONField(name = "routeFare")
    public double price;//单价

    @JSONField(name = "resSeat")
    public int resSeat;//剩余搭车人数

    @JSONField(name = "seat")
    public int seat;//总搭车人数

    @JSONField(name = "pasNum")
    public int pasNum;

    @JSONField(name = "routeUuid")
    public String routeUuid;

    public int typeTime; //实时 或 预约

}
